import { experimenttest } from '@/api/home'
const state = {
    menu: false,
    token: "",
    user: {
    }
    // 获取token
}
const mutations = {
    selectmenu(state, val) {
        state.menu = val
    },
    setuser(state, val) {
        // console.log(val, 'token  ');
        state.user = val
    },
    token(state, val) {
        state.token = val
    }
}
const actions = {
    async experimenttest({ commit }, param) {
        const { token, user } = await experimenttest(param)
        console.log(token);
        commit('token', token)
        commit('setuser', user)
    }
}
export default {
    namespaced: true,//vuex命名空间开启
    state,
    mutations,
    actions
}